<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:28 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1026] Need to be able to convert a password to its hash value using c#</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1026</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am trying to come up with a C# code to add users to a mongodb database.&lt;br/&gt;
I have the below code, and need the password to be in a password hash format to insert it into system.users. Can you tell me if there any built-in function in c#, or any other price of code that I can use to convert a password into the hash format before inserting it into system.users?&lt;/p&gt;

&lt;p&gt;var user = new MongoUser(&quot;foouser&quot;, new PasswordEvidence(&quot;foopassword&quot;), true); var database = server.GetDatabase(&quot;admin&quot;); var usersCollection = database.GetCollection(&quot;system.users&quot;);&lt;br/&gt;
var userDocument = new BsonDocument&lt;br/&gt;
{&lt;br/&gt;
    &lt;/p&gt;
{ &quot;user&quot;, user.Username }
&lt;p&gt;,&lt;br/&gt;
    &lt;/p&gt;
{ &quot;pwd&quot;, user.PasswordHash }
&lt;p&gt;,&lt;br/&gt;
    &lt;/p&gt;
{ &quot;roles&quot;, new BsonArray() }
&lt;p&gt;,&lt;br/&gt;
    { &quot;otherDBRoles&quot;, new BsonDocument(&quot;productDB&quot;, new BsonArray &lt;/p&gt;
{ &quot;readWrite&quot; }
&lt;p&gt;) } }; usersCollection.Insert(userDocument);&lt;/p&gt;</description>
                <environment></environment>
        <key id="151112">CSHARP-1026</key>
            <summary>Need to be able to convert a password to its hash value using c#</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jayashree_v_p">Jaya</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Wed, 6 Aug 2014 16:32:17 +0000</created>
                <updated>Fri, 5 Apr 2019 13:57:54 +0000</updated>
                            <resolved>Sat, 4 Apr 2015 22:33:44 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs14zb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>131140</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>