@@ -24,7 +24,7 @@ import (
24
24
func EncryptPIN (ctx context.Context , pin , pinToken , sessionId , privateKey string , iterator uint64 ) (string , error ) {
25
25
_ , err := base64 .RawURLEncoding .DecodeString (privateKey )
26
26
if err == nil {
27
- return EncryptEd25519PIN (ctx , pin , pinToken , sessionId , privateKey , iterator )
27
+ return EncryptEd25519PIN (ctx , pin , pinToken , privateKey , iterator )
28
28
}
29
29
privBlock , _ := pem .Decode ([]byte (privateKey ))
30
30
if privBlock == nil {
@@ -64,7 +64,7 @@ func EncryptPIN(ctx context.Context, pin, pinToken, sessionId, privateKey string
64
64
return base64 .StdEncoding .EncodeToString (ciphertext ), nil
65
65
}
66
66
67
- func EncryptEd25519PIN (ctx context.Context , pin , pinTokenBase64 , sessionId , privateKey string , iterator uint64 ) (string , error ) {
67
+ func EncryptEd25519PIN (ctx context.Context , pin , pinTokenBase64 , privateKey string , iterator uint64 ) (string , error ) {
68
68
privateBytes , err := base64 .RawURLEncoding .DecodeString (privateKey )
69
69
if err != nil {
70
70
return "" , err
@@ -110,7 +110,7 @@ func VerifyPIN(ctx context.Context, uid, pin, pinToken, sessionId, privateKey st
110
110
var encryptedPIN string
111
111
pt , err := base64 .RawURLEncoding .DecodeString (pinToken )
112
112
if err == nil && len (pt ) == 32 {
113
- encryptedPIN , err = EncryptEd25519PIN (ctx , pin , pinToken , sessionId , privateKey , uint64 (time .Now ().UnixNano ()))
113
+ encryptedPIN , err = EncryptEd25519PIN (ctx , pin , pinToken , privateKey , uint64 (time .Now ().UnixNano ()))
114
114
} else {
115
115
encryptedPIN , err = EncryptPIN (ctx , pin , pinToken , sessionId , privateKey , uint64 (time .Now ().UnixNano ()))
116
116
}
0 commit comments