Bitwarden-app-android-iphon.../src/App/Utilities/Extentions.cs

22 lines
460 B
C#

using System;
using Bit.App.Abstractions;
using Bit.App.Models;
using XLabs.Ioc;
namespace Bit.App
{
public static class Extentions
{
public static CipherString Encrypt(this string s)
{
if(s == null)
{
throw new ArgumentNullException(nameof(s));
}
var cryptoService = Resolver.Resolve<ICryptoService>();
return cryptoService.Encrypt(s);
}
}
}