public string UnlockKey(GPGUnlockKeyData unlockData) { try { string fingerPrint = pgpManager.UnlockKey(unlockData.FingerPrint, unlockData.Password); sm.PutKeyPassword(fingerPrint, unlockData.Password); } catch (Exception e) { throw new ErrorObjectException(new ErrorObject { ErrorCode = ErrorCodes.InvalidFieldData, ErrorField = "Password", ErrorData = e, Message = "Cannot Decrypt Key" }); } return("OK"); }