bitwarden-android/src/App/Utilities/Extentions.cs

22 lines
460 B
C#
Raw Normal View History

2016-05-02 09:52:09 +03:00
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);
}
}
}