diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-19 08:46:13 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-19 08:46:13 -0700 |
commit | 1eb2194b3f6bd58f5f91c864237dc7ed323ec967 (patch) | |
tree | 741c115e2f21aff78899953840279a5cb5ba247f /src/types.ts | |
parent | 1a894a0431a35d7b705d1ced477ba82606c490af (diff) |
Add types for SafetyNet JWT parts
Diffstat (limited to 'src/types.ts')
-rw-r--r-- | src/types.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts index 3773a8b..59e70c1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -85,3 +85,20 @@ export enum COSEKEYS { }; export type COSEPublicKey = Map<COSEAlgorithmIdentifier, number | Buffer>; + +export type SafetyNetJWTHeader = { + alg: 'string', + x5c: string[], +}; + +export type SafetyNetJWTPayload = { + nonce: string, + timestampMs: number, + apkPackageName: string, + apkDigestSha256: string, + ctsProfileMatch: boolean, + apkCertificateDigestSha256: string[], + basicIntegrity: boolean, +}; + +export type SafetyNetJWTSignature = string; |