@@ -20,6 +20,22 @@ class MockCryptoClient: CryptoClientProtocol {
2020 var enrollAdminPasswordPublicKey : String ?
2121 var enrollAdminPasswordResetResult : Result < String , Error > = . success( " RESET_PASSWORD_KEY " )
2222
23+ var enrollPinPin : String ?
24+ var enrollPinResult : Result < EnrollPinResponse , Error > = . success(
25+ EnrollPinResponse (
26+ pinProtectedUserKeyEnvelope: " pinProtectedUserKeyEnvelope " ,
27+ userKeyEncryptedPin: " userKeyEncryptedPin "
28+ )
29+ )
30+
31+ var enrollPinWithEncryptedPinEncryptedPin : String ?
32+ var enrollPinWithEncryptedPinResult : Result < EnrollPinResponse , Error > = . success(
33+ EnrollPinResponse (
34+ pinProtectedUserKeyEnvelope: " pinProtectedUserKeyEnvelope " ,
35+ userKeyEncryptedPin: " userKeyEncryptedPin "
36+ )
37+ )
38+
2339 var getUserEncryptionKeyResult : Result < String , Error > = . success( " USER_ENCRYPTION_KEY " )
2440
2541 var initializeOrgCryptoRequest : InitOrgCryptoRequest ?
@@ -55,6 +71,16 @@ class MockCryptoClient: CryptoClientProtocol {
5571 return try enrollAdminPasswordResetResult. get ( )
5672 }
5773
74+ func enrollPin( pin: String ) throws -> EnrollPinResponse {
75+ enrollPinPin = pin
76+ return try enrollPinResult. get ( )
77+ }
78+
79+ func enrollPinWithEncryptedPin( encryptedPin: EncString ) throws -> EnrollPinResponse {
80+ enrollPinWithEncryptedPinEncryptedPin = encryptedPin
81+ return try enrollPinWithEncryptedPinResult. get ( )
82+ }
83+
5884 func getUserEncryptionKey( ) async throws -> String {
5985 try getUserEncryptionKeyResult. get ( )
6086 }
0 commit comments